﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

/*
 * Author:Conis
 * Date:
 * Description:SQL语句中的比较单元
 */

namespace Conis.Squirrel.SqlBuilder.SqlServer
{
    /// <summary>
    /// SQL语句的比较单元
    /// </summary>
    public class CompareUnit<T> : BaseCompareUnit<T>
    {
        protected internal CompareUnit(Connector connector, string fieldName, CompareOperator compare, T value, bool valueIsSafe) :
            base(connector, fieldName, compare, value, valueIsSafe) { }

        /// <summary>
        /// 创建一个参数
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        protected override IDataParameter CreateParameter(string key, object value)
        {
            return new SqlParameter(key, value);
        }
    }
}
